/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 苏李涛
 * Date: 2024-04-26
 * Time: 18:27
 */
public class greatest {
    public static void main(String[] args) {
        int a = 24;
        int b = 18;
        int c = a % b;
        while (a % b != 0) {
            a = b;
            b = c;
            System.out.println(b);
        }

    }
}
